package cn.neusoft.edu.his.demo.controller;
import cn.neusoft.edu.his.demo.common.Result;
import cn.neusoft.edu.his.demo.mapper.CarouselMapper;
import cn.neusoft.edu.his.demo.po.Carousel;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@Api("HomePageController相关的api")
@RestController
public class CarouselController {
    @Autowired
    CarouselMapper homePageMapper;
    @RequestMapping("/getPage")
    public Result getPage(){
        List<Carousel> homePage = homePageMapper.selectList(null);
        return Result.ok(homePage);
    }
}
